home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Floppyshop 2
/
Floppyshop - 2.zip
/
Floppyshop - 2.iso
/
diskmags
/
3565-4.665
/
dmg-4385
/
issue_10
/
13.pne
< prev
next >
Wrap
Text File
|
1987-04-21
|
2KB
|
72 lines
STOS 3D by Matthew Green.
Well this month we will start writing a game using STOS 3D. This game will
be a simple racing game which could be made into a very complex game if
you really tried.
The basic program is an example program you get on the Installation Disk
you get with STOS 3D which was called 'TDLOOP.BAS'. To start with this
we need to modify this program in the following ways :
NOTE : Remember to have the td INIT command before any other command.
First you have to change line 50 to :
50 td load "car2"
This loads the object into memory.
Then change line 60 to :
60 td object "CAR2",-2000,0,0,0,16384,0
If you run the program now you won't see anything this is because car
number 2 is to your left.
There is no need to load car 1 yet because you are sitting in it and you
will not be able to see it.
Car 2 will be the computers car or player 2's car.
But first off we need to move our car first.
The easist way of moving our car is by the 'td forward' command which we
will use in this case.
Add :
102 if s<0 then s=10: rem make sure speed stays above 0
103 if s>200 then s=200: rem creates top speed
106 if fire then s=s+10 : goto 110 : rem increases speed when fire
108 if s>0 then s=s-10 : rem slows down when fire is not pressed
110 if jleft then td angle rel 0,0,-430-s,0 : rem turns left
112 if jright then td angle rel 0,0,430-s,0 : rem turns right
114 td forward 0,s : rem object 0 moves s number of units
Now if you run the program you will still see nothing but if you turn left
you will see the other car. If you press fire you can then drive around.
What we need now is a speedo :
155 locate 2,20:print "Speed : ";s;" "
Well that should get you started and if you can't cope with it I will put
the program so far on next months disk so you better get STOSSER.
Next time we will try and add a few more objects for the course.
If you have any ideas for this game or any questions on 3D I will try
and solve them for you.
One last thing I am writing a space game like 'Elite II' but not as good
and a need a favor :
I need space stations and space ships designed on the OM so I can put them
in space. If you want somthing special on the station just write it down
and I will try and add it to it.
If any one can help me and would be very grateful.
Well until next time....